import "virtual:uno.css";
import { createSSRApp } from "vue";
import App from "./App.vue";
import * as Pinia from "pinia";
import "@/static/css/global.scss";
import "@/static/css/fonts.scss";

import newsItem from "@/components/newsItem/newsItem.vue"; // 资讯公告项
import videoItem from "@/components/videoItem/videoItem.vue"; // 直播视频项
import mapLocation from "@/components/map/index.vue"; // 地图选址

// 在入口文件（如 main.js）或页面脚本中
import VConsole from 'vconsole';

// 初始化（生产环境建议通过条件判断禁用）
const vConsole = new VConsole();

// 测试日志
console.log('Hello vConsole!');

export function createApp() {
  const app = createSSRApp(App);
  app.use(Pinia.createPinia());
  app.component("newsItem", newsItem);
  app.component("videoItem", videoItem);
  app.component("mapLocation", mapLocation);
  return {
    app,
    Pinia,
  };
}
